document.writeln(`
<style>
        #uploadform{
            width: 500px;
            padding: 20px 50px;
            background-color: #eee;
            margin: auto;
            border-radius: 3%;
            line-height: 3em;
        }
        #uploadform label{
            display: inline-block;
            width: 150px;
        }
        #uploadform input{
            width: 300px;
            box-sizing: border-box;
            padding: 5px;
        }
        #uploadform button{
            width: 100px;
            box-sizing: border-box;
            padding: 3px;
        }
    </style>
`)
Vue.component("uploader", {
    template: `
    <form id="uploadform" action="/upload" method="post" enctype="multipart/form-data">
        <h2>文件上传</h2>
        <div v-for="i in counts">
        <label>文件{{i}}:</label><input name="file" type="file" style="padding-left: 0px">
        </div>
        <hr>
        <label></label>
        <button @click.prevent="counts++">添 加</button>
        <button>上 传</button>
    </form>
    `,
    data() {
        return {counts: 1}
    }
})